<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
	<title>Questions</title>
</h:head>
<ui:composition template="mainTemplate.xhtml">
	<ui:define name="header">
		<ui:include src="studentHeader.xhtml" />
	</ui:define>
	<ui:define name="main_content">
		<h:form id="form1">
			<p:messages id="messages" autoUpdate="true" />
			<p:breadCrumb>
				<p:menuitem value="Courses" url="studentMainPage.jsf" />
				<p:menuitem value="Course Classes" url="courseClassesPage.jsf" />
				<p:menuitem value="Class" url="classPage.jsf" />
				<p:menuitem value="Class Exercises" url="exercisesPage.jsf" />
			</p:breadCrumb>
			<p:panel>
				<h:outputText
					value="#{studentMainController.selectedExercise.exerciseText}" />
			</p:panel>
			<p:panel>
				<p:dataTable id="dataTable" var="questions"
					value="#{studentMainController.selectedExercise.questions}"
					selection="#{studentMainController.selectedQuestion}"
					selectionMode="single" rowKey="#{questions.id}">
					<p:column>
						<f:facet name="header">
							<h:outputText value="Alternatives" />
						</f:facet>
						<h:outputText value="#{questions.title}" />
					</p:column>
				</p:dataTable>
			</p:panel>
			<p:panel>
				<p:commandButton value="Answer"
					action="#{studentMainController.answerQuestion}" />
			</p:panel>
		</h:form>
	</ui:define>
</ui:composition>
</html>